package com.ewzj.bigdata.mvp.model.entity.resbean;


import android.os.Parcel;
import android.os.Parcelable;

import com.chad.library.adapter.base.entity.MultiItemEntity;
import com.volokh.danylo.visibility_utils.items.ListItem;

import java.util.List;

/**
 * Author:zhangjing
 * Time:2018/2/1  下午3:39
 * Name: this is NewBean
 * Email:zhangjingworkmol@163.com
 */

public class NewBean implements MultiItemEntity , Parcelable {


    /**
     * id : 2
     * type : 2
     * tag : 历史
     * tag_shape : 0
     * title : 日本真实巨人墙：11年海啸后当地花百亿建13米高墙防洪，像在监狱
     * summary : null
     * thumb : ["https://imgm.gmw.cn/attachement/jpg/site2/20180310/8174818286740091736.jpg","https://imgm.gmw.cn/attachement/jpg/site2/20180310/4644012483089710231.jpg","https://imgm.gmw.cn/attachement/jpg/site2/20180310/7311950423375002067.jpg","https://imgm.gmw.cn/attachement/jpg/site2/20180310/5397641637518855043.jpg","https://imgm.gmw.cn/attachement/jpg/site2/20180310/138761013438821767.jpg","https://imgm.gmw.cn/attachement/jpg/site2/20180310/4280626579945574311.jpg"]
     * video : null
     * visit_num : 2
     * comment_num : 22
     * category_id : 0
     * category_name : null
     * time : null
     */

    private int id;
    private int type;
    private String tag;
    private int tag_shape;
    private String title;
    private String source;
    private Boolean is_ad;
    private String summary;
    private String video;
    private int visit_num;
    private int comment_num;
    private int category_id;
    private String category_name;
    private String time;
    private List<String> thumb;

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public Boolean getIs_ad() {
        return is_ad;
    }

    public void setIs_ad(Boolean is_ad) {
        this.is_ad = is_ad;
    }

    public static Creator<NewBean> getCREATOR() {
        return CREATOR;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    public int getTag_shape() {
        return tag_shape;
    }

    public void setTag_shape(int tag_shape) {
        this.tag_shape = tag_shape;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getSummary() {
        return summary;
    }

    public void setSummary(String summary) {
        this.summary = summary;
    }

    public String getVideo() {
        return video;
    }

    public void setVideo(String video) {
        this.video = video;
    }

    public int getVisit_num() {
        return visit_num;
    }

    public void setVisit_num(int visit_num) {
        this.visit_num = visit_num;
    }

    public int getComment_num() {
        return comment_num;
    }

    public void setComment_num(int comment_num) {
        this.comment_num = comment_num;
    }

    public int getCategory_id() {
        return category_id;
    }

    public void setCategory_id(int category_id) {
        this.category_id = category_id;
    }

    public String getCategory_name() {
        return category_name;
    }

    public void setCategory_name(String category_name) {
        this.category_name = category_name;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public List<String> getThumb() {
        return thumb;
    }

    public void setThumb(List<String> thumb) {
        this.thumb = thumb;
    }

    public NewBean() {
    }

    @Override
    public int getItemType() {
        return type;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.id);
        dest.writeInt(this.type);
        dest.writeString(this.tag);
        dest.writeInt(this.tag_shape);
        dest.writeString(this.title);
        dest.writeString(this.source);
        dest.writeValue(this.is_ad);
        dest.writeString(this.summary);
        dest.writeString(this.video);
        dest.writeInt(this.visit_num);
        dest.writeInt(this.comment_num);
        dest.writeInt(this.category_id);
        dest.writeString(this.category_name);
        dest.writeString(this.time);
        dest.writeStringList(this.thumb);
    }

    protected NewBean(Parcel in) {
        this.id = in.readInt();
        this.type = in.readInt();
        this.tag = in.readString();
        this.tag_shape = in.readInt();
        this.title = in.readString();
        this.source = in.readString();
        this.is_ad = (Boolean) in.readValue(Boolean.class.getClassLoader());
        this.summary = in.readString();
        this.video = in.readString();
        this.visit_num = in.readInt();
        this.comment_num = in.readInt();
        this.category_id = in.readInt();
        this.category_name = in.readString();
        this.time = in.readString();
        this.thumb = in.createStringArrayList();
    }

    public static final Creator<NewBean> CREATOR = new Creator<NewBean>() {
        @Override
        public NewBean createFromParcel(Parcel source) {
            return new NewBean(source);
        }

        @Override
        public NewBean[] newArray(int size) {
            return new NewBean[size];
        }
    };
}
